From: Keir Fraser Date: Mon, 26 Oct 2009 13:26:43 +0000 (+0000) Subject: x86: Small simplification to get_page_from_l1e(). X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13172 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=9db20f3c2b99baacbfa7f95195cdb77c37ddd81e;p=xen.git x86: Small simplification to get_page_from_l1e(). No need for separate top-level check for page owner being NULL: this can be folded into the case that page owner is not who the caller expected (caller will never expect NULL owner). Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index f30d9ca2fd..f50b5fab87 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -780,9 +780,6 @@ get_page_from_l1e( return 1; } - if ( real_pg_owner == NULL ) - goto could_not_pin; - if ( unlikely(real_pg_owner != pg_owner) ) { /* @@ -791,7 +788,8 @@ get_page_from_l1e( * dom0, until pvfb supports granted mappings. At that time this * minor hack can go away. */ - if ( (pg_owner == l1e_owner) || !IS_PRIV_FOR(pg_owner, real_pg_owner) ) + if ( (real_pg_owner == NULL) || (pg_owner == l1e_owner) || + !IS_PRIV_FOR(pg_owner, real_pg_owner) ) goto could_not_pin; pg_owner = real_pg_owner; }